LayoutClickableWidget

class LayoutClickableWidget(x: Int, y: Int, width: Int, height: Int, layout: LayoutWidget) : ClickableWidget, ParentElement, TooltipChild, Scalable

Clickable widget that contains a LayoutWidget which provides and lays out children of this widget. The layout will be automatically constrained to the dimensions of the widget, and updated as the position and size changes.

Author

fzzyhmstrs

Since

0.6.0

Parameters

x

X position of the widget in pixels

y

Y position of the widget in pixels

width

width of the widget in pixels

height

height of the widget in pixels

layout

LayoutWidget the layout wrapped by this widget

Constructors

Link copied to clipboard
constructor(x: Int, y: Int, width: Int, height: Int, layout: LayoutWidget)

Properties

Link copied to clipboard
Link copied to clipboard
var message: Text
Link copied to clipboard
Link copied to clipboard
@Nullable
@get:Nullable
var tooltip: Tooltip?
Link copied to clipboard
Link copied to clipboard
val x: Int
Link copied to clipboard
val y: Int

Functions

Link copied to clipboard
override fun appendNarrations(builder: NarrationMessageBuilder)
Link copied to clipboard
open override fun charTyped(chr: Char, modifiers: Int): Boolean
Link copied to clipboard
open override fun children(): MutableList<out Element>
Link copied to clipboard
open fun drawTexture(context: DrawContext, texture: Identifier, x: Int, y: Int, u: Int, v: Int, hoveredVOffset: Int, width: Int, height: Int, textureWidth: Int, textureHeight: Int)
Link copied to clipboard
open fun focusOn(@Nullable element: Element?)
Link copied to clipboard
open override fun forEachChild(consumer: Consumer<ClickableWidget>)
Link copied to clipboard
open override fun getFocused(): Element?
Link copied to clipboard
open override fun getFocusedPath(): GuiNavigationPath?
Link copied to clipboard
open override fun getHeight(): Int
Link copied to clipboard
open override fun getNavigationFocus(): ScreenRect
Link copied to clipboard
open override fun getNavigationPath(navigation: GuiNavigation?): GuiNavigationPath?
Link copied to clipboard
open override fun getType(): Selectable.SelectionType
Link copied to clipboard
open override fun getWidth(): Int
Link copied to clipboard
open fun hoveredElement(mouseX: Double, mouseY: Double): Optional<Element>
Link copied to clipboard
open override fun isDragging(): Boolean
Link copied to clipboard
open override fun isFocused(): Boolean
Link copied to clipboard
open fun isHovered(): Boolean
Link copied to clipboard
open override fun isMouseOver(mouseX: Double, mouseY: Double): Boolean
Link copied to clipboard
open override fun isNarratable(): Boolean
Link copied to clipboard
open fun isSelected(): Boolean
Link copied to clipboard
open override fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean
Link copied to clipboard
open override fun keyReleased(keyCode: Int, scanCode: Int, modifiers: Int): Boolean
Link copied to clipboard
open override fun mouseClicked(mouseX: Double, mouseY: Double, button: Int): Boolean
Link copied to clipboard
open override fun mouseDragged(mouseX: Double, mouseY: Double, button: Int, deltaX: Double, deltaY: Double): Boolean
Link copied to clipboard
open fun mouseMoved(mouseX: Double, mouseY: Double)
Link copied to clipboard
open override fun mouseReleased(mouseX: Double, mouseY: Double, button: Int): Boolean
Link copied to clipboard
open override fun mouseScrolled(mouseX: Double, mouseY: Double, verticalAmount: Double): Boolean
Link copied to clipboard
open override fun onClick(mouseX: Double, mouseY: Double)
Link copied to clipboard
open fun onRelease(mouseX: Double, mouseY: Double)
Link copied to clipboard
open fun playDownSound(soundManager: SoundManager)
Link copied to clipboard
open fun provideNarrationLines(): List<Text>

Provides a list of text for appending into a Narration Hint. By default this will use the same lines passed from provideTooltipLines, with predefined values for the inputs

Link copied to clipboard
open fun provideTooltipLines(mouseX: Int, mouseY: Int, parentSelected: Boolean, keyboardFocused: Boolean): List<Text>

Provides a list of text lines for appending to a tooltip. Unlike appending in MC, the parent has final say on compiling the tooltip from the pieces given to it.

Link copied to clipboard
open override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float)
Link copied to clipboard
open fun setAlpha(alpha: Float)
Link copied to clipboard
fun setDimensions(width: Int, height: Int)
Link copied to clipboard
fun setDimensionsAndPosition(width: Int, height: Int, x: Int, y: Int)
Link copied to clipboard
open override fun setDragging(dragging: Boolean)
Link copied to clipboard
open override fun setFocused(focused: Boolean)
open override fun setFocused(focused: Element?)
Link copied to clipboard
open override fun setH(height: Int)
Link copied to clipboard
open override fun setPosition(x: Int, y: Int)
Link copied to clipboard
open fun setTooltipDelay(delay: Int)
Link copied to clipboard
open override fun setW(width: Int)
Link copied to clipboard
open override fun setWidth(width: Int)
Link copied to clipboard
open override fun setX(x: Int)
Link copied to clipboard
open override fun setY(y: Int)